package com.hua.nailcampus.acl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.hua.nailcampus.acl.mapper.CityMapper;
import com.hua.nailcampus.acl.model.City;
import com.hua.nailcampus.acl.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:chenjianhua
 * @Date:2023/11/13 20:01
 * @Version 17
 */
@Service
public class CityServiceImpl extends ServiceImpl<CityMapper,City>
    implements CityService{

    @Autowired
    private CityMapper cityMapper;

    @Override
    public List<City> getAllCities(Integer pId) {

        List<City> cityList = cityMapper.selectList(
                new LambdaQueryWrapper<City>().eq(City::getPId,pId));
        return cityList;
    }
}
